package ntd.tool;

/**
 * class 处理工具
 */
public class ToolClass {

    @SuppressWarnings("unchecked")
    public static <T> T t(Object obj) {
        return (T) obj;
    }

    public static <T> T t(Class<?> clazz) {
        try {
            return t(clazz.newInstance());
        } catch (InstantiationException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
}
